package io.github.lee.plugin.depend.impl

import io.github.lee.plugin.depend.Versions
import io.github.lee.plugin.depend.handler.IHandlerDepend
import io.github.lee.plugin.depend.handler.androidTestImplementation
import io.github.lee.plugin.depend.handler.debugImplementation
import io.github.lee.plugin.depend.handler.implementation
import org.gradle.api.artifacts.dsl.DependencyHandler

object Compose : IHandlerDepend {

    private const val activityCompose =
        "androidx.activity:activity-compose:${Versions.activityCompose}"
    private const val composeBom = "androidx.compose:compose-bom:${Versions.composeBom}"
    private const val composeUI = "androidx.compose.ui:ui"
    private const val composeUIGraphics = "androidx.compose.ui:ui-graphics"
    private const val composeUIToolingPreview = "androidx.compose.ui:ui-tooling-preview"
    private const val composeMaterial = "androidx.compose.material:material:${Versions.composeMaterial}"
    private const val composeMaterial3 = "androidx.compose.material3:material3"
    private const val composeUIJunit4 = "androidx.compose.ui:ui-test-junit4"
    private const val composeUITooling = "androidx.compose.ui:ui-tooling"
    private const val composeUIManifest = "androidx.compose.ui:ui-test-manifest"
    private const val composeConstraintlayout =
        "androidx.constraintlayout:constraintlayout-compose:${Versions.composeConstraintlayout}"

    override fun handler(handler: DependencyHandler) {
        handler.implementation(activityCompose)
        handler.implementation(handler.platform(composeBom))
        handler.implementation(composeUI)
        handler.implementation(composeUIGraphics)
        handler.implementation(composeUIToolingPreview)
        handler.implementation(composeMaterial)
        handler.implementation(composeMaterial3)
        handler.implementation(composeConstraintlayout)


        handler.androidTestImplementation(handler.platform(composeBom))
        handler.androidTestImplementation(composeUIJunit4)
        handler.debugImplementation(composeUITooling)
        handler.debugImplementation(composeUIManifest)

    }

}